<?php
require_once 'database.php';
require_once 'common.php';

session_start();

//Get information from the post
$intProjectId = $_POST['project_id'];

$dbResult = mysql_query("DELETE FROM project WHERE project_id=$intProjectId");

$intRows = mysql_affected_rows();

$objReturn = array();

if($intRows == 1){
	$objReturn['code'] = "SUCCESS";
} else {

	$objReturn['code'] = "ERROR";
	$objReturn['message'] = "Something horrible has happened!";
}

header("content-type:application/json");
echo json_encode($objReturn);
